//
//  HttpClient.h
//  mlh
//
//  Created by qd on 13-5-8.
//  Copyright (c) 2013年 sunday. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LLNetworkCommand.h"
#import "Constants.h"
#import "PxGlobal.h"
#import "LLSmallUtil.h"

#define nilOrJSONObjectForKey(JSON_, KEY_) [JSON_ objectForKey:KEY_] == [NSNull null] ? nil : [JSON_ valueForKeyPath:KEY_];
#define kNetWaitingNotify       @"llnetwaiting"
#define kNetWaitingDoneNotify   @"llnetwaitingdone"
#define kNetErrorAlertNothify   @"LLNetErrorAlert"

@class LLRestClient;

@interface LLRestEngine : NSObject
{
    int     waitingCount;
    //UIView *waitingView;
}

+ (instancetype)sharedInstance;

@property (nonatomic, retain) NSString *user_id;
@property (nonatomic, retain) NSString *oid_partner;

@property (nonatomic, strong) LLRestClient *releaseServer;
@property (nonatomic, strong) LLRestClient *testServer;
@property (nonatomic, strong) LLRestClient *testSecureServer;

@property (nonatomic, strong) NSDictionary *funcInfoDic;

@property(nonatomic,getter=isTestMode) BOOL testMode;

//+ (NSString*)transcodeForFunctionName:(NSString*)functionName;

+ (void)sendCommandRequest:(LLNetworkCommand*)command;

@end